<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<ul>
  <!--v-for="a in b" b代表遍历的数组 a是数组中遍历出的对象-->
  <li v-for="name in names">{{name}}</li>
</ul>
<table border="1">
  <caption>汽车列表</caption>
  <tr>
    <th>名字</th>
    <th>价格</th>
    <th>类型</th>
  </tr>
  <tr v-for="car in cars">
    <td>{{car.name}}</td>
    <td>{{car.price}}</td>
    <td>{{car.type}}</td>
  </tr>
</table>
<!--引入Vue-->
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>
  let v1 = new Vue({
    el:"ul",
    data:{
      names:["悟空","八戒","沙僧"]
    }
  })
  let v2 = new Vue({
    el:"table",
    data: {
      cars:[{name:"雪佛兰科迈罗",price:580000,type:"跑车"},
        {name:"蔚来ES8",price:550000,type:"纯电SUV"},
        {name:"奔驰GLE",price:980000,type:"SUV"}]
    },
  })
</script>
</body>
</html>